﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace eLuk.Entity
{

	[DataContract]
	public sealed class MailMessage
	{

		public MailMessage()
		{
			this.UID = 0;
			//this.IsMultipart = false;
			this.Attachments = new Attachments();
			this.EmbeddedObjects = new Attachments();
			this.Bcc = new MailAddresses();
			this.Cc = new MailAddresses();
			this.From = new MailAddress();
			this.To = new MailAddresses();
			this.MessageMetaData = new MessageMetaData();
			this.MessageContents = new MessageContents();
			this.Size = 0;
			this.HtmlBody = "";
			this.TextBody = "";
		}

		[DataMember]
		public MessageMetaData MessageMetaData { get; set; }

		[DataMember]
		public long Size { get; set; }

		[DataMember]
		public string Subject { get; set; }

		[DataMember]
		public string MessageID { get; set; }

		[DataMember]
		public DateTime SendReceiveDateTime { get; set; }

		//[DataMember]
		//public ContentBoundries ContentBoundries { get; set; }

		[DataMember]
		public MailAddresses To { get; set; }

		[DataMember]
		public MailAddresses Cc { get; set; }

		[DataMember]
		public MailAddresses Bcc { get; set; }

		[DataMember]
		public MailAddress From { get; set; }

		[DataMember]
		public uint UID { get; set; }

		[DataMember]
		public bool Seen { get; set; }

		[DataMember]
		public Attachments Attachments { get; set; }

		[DataMember]
		public Attachments EmbeddedObjects { get; set; }

		[DataMember]
		public string TextBody { get; set; }
		
		[DataMember]
		public string HtmlBody { get; set; }

		[DataMember]
		public MessageContents MessageContents { get; set; }

	}

	[CollectionDataContract]
	public class MailMessages : List<MailMessage>
	{
		
		public MailMessages()
		{
			//MailMessage msg = new MailMessage();
		}
	}

}
